package com.collect.zambia.zhiUtils;

import android.content.Context;
import android.view.Menu;
import android.view.View;
import android.widget.PopupMenu;

import com.collect.zambia.R;

public class MenuUtil {

    public static PopupMenu getProductMenu(Context context, View anchorView, PopupMenu.OnMenuItemClickListener listener) {
        PopupMenu mPopupMenu = new PopupMenu(context, anchorView);
        Menu menu_more = mPopupMenu.getMenu();

        String[] productlist = new String[]{
                context.getString(R.string.product_zaidicash)
        };

        for (int i = 0; i < productlist.length; i++) {
            menu_more.add(Menu.NONE, Menu.FIRST + i, i, productlist[i]);
        }

        mPopupMenu.setOnMenuItemClickListener(listener);

        return mPopupMenu;
    }
}
